package com.dailyblue.java.project.bookstore.book.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dailyblue.java.project.bookstore.book.bean.Book;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface BookMapper extends BaseMapper<Book> {
    /**
     * 最新上架的五本图书
     * @Date 2022年10月11日 09:31:19
     */
    @Select("select * from books where state=1 order by book_time desc limit 5")
    List<Book> findBookByNewArrival();
}
